package com.gxjc.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import com.gxjc.dao.bean.HomeDao;
import com.gxjc.model.Home;
@Transactional
public class HomeService {
	@Autowired
	HomeDao homeDao;
	public List<Home> getAll(){
		return homeDao.getAll();	
	}
	
	public void save(Home home) {
		homeDao.save(home);
	}
	
	public void delete(int id) {
		homeDao.delete(id);
	}
	
	public Home getHomeById(int id) {
		return (Home)homeDao.getHomeById(id);
	}
	public List<Home> getHomeBySql(String sql) {
		return homeDao.getHomeBySql(sql);
	}
	public void update(Home home) {
		homeDao.update(home);
	}
	//get and set

	public HomeDao getHomeDao() {
		return homeDao;
	}

	public void setHomeDao(HomeDao homeDao) {
		this.homeDao = homeDao;
	}
	
	
}
